home *** CD-ROM | disk | FTP | other *** search
/ Tripas 2 / TRIPAS 002.iso / RRRA.exe / COOT.CON < prev    next >
Encoding:
Text File  |  1998-07-02  |  9.9 KB  |  507 lines

  1. // COOT
  2.  
  3. // Tiles starting positions for Coot
  4. // COOT        5376  actor - Tile to be used in MAKEMAP
  5. // COOTSTAYPUT 5377  actor - Tile to be used in MAKEMAP
  6. // COOTSHOOT   5411
  7. // COOTDIE     5437
  8. // COOTDUCK    5481
  9. // COOTPAIN    5548
  10. // COOTTRANS   5568
  11. // COOTGETUP   5579
  12.  
  13. // Local defines
  14.  
  15. // Define actions
  16. action ACOOTDEFAULT     0  1  5  1    1
  17. action ACOOTWALKING     0  7  5  1   11
  18. action ACOOTSTAND      69  7  5  1   13
  19. action ACOOTRUNNING     0  7  5  1   11
  20. action ACOOTSHOOT      35  2  5  1   23
  21. action ACOOTRAISEGUN   45  2  5 -1   10
  22. action ACOOTLOWERGUN   55  2  5  1   10
  23. action ACOOTPAIN      172  4  5  1   22
  24. action ACOOTDYING      61  9  1  1   16
  25. action ACOOTLYINGDEAD  68  1  1  1    1
  26. action ACOOTFALLDOWN   61  7  1  1   16
  27. action ACOOTGETUP     148  3  5  1   13
  28. action ACOOTDUCKWALK  105  9  5  1   11
  29. action ACOOTCROUCHUP  192  2  5  1   10
  30. action ACOOTCROUCHDN  197  2  5 -1   10
  31.  
  32. // Define movements
  33. move   COOTDUCKWALKVEL    18
  34. move   COOTWALKVEL        35
  35. move   COOTRUNVEL         35
  36. move   COOTSTOP
  37.  
  38. // Define AI states
  39. ai AICOOTDUCKWALK     ACOOTDUCKWALK   COOTDUCKWALKVEL  dodgebullet geth
  40. ai AICOOTGETENEMY     ACOOTWALKING    COOTWALKVEL      seekplayer
  41. ai AICOOTDODGE        ACOOTRUNNING    COOTRUNVEL       dodgebullet
  42. ai AICOOTCHARGEENEMY  ACOOTRUNNING    COOTRUNVEL       seekplayer
  43. ai AICOOTFLEENEMY     ACOOTWALKING    COOTWALKVEL      fleeenemy
  44. ai AICOOTDYING        ACOOTDYING      COOTSTOP         faceplayer
  45. ai AICOOTSHOOT        ACOOTSHOOT      COOTSTOP         faceplayer
  46. ai AICOOTLOWERGUN     ACOOTLOWERGUN   COOTSTOP         faceplayer
  47. ai AICOOTRAISEGUN     ACOOTRAISEGUN   COOTSTOP         faceplayer
  48. ai AICOOTFALLDOWN     ACOOTFALLDOWN   COOTSTOP         faceplayer
  49. ai AICOOTGETUP        ACOOTGETUP      COOTSTOP         faceplayerslow
  50. ai AICOOTPAIN         ACOOTPAIN       COOTSTOP         faceplayerslow
  51. ai AICOOTSTAND        ACOOTSTAND      COOTSTOP         faceplayerslow
  52. ai AICOOTCROUCHUP     ACOOTCROUCHUP   COOTSTOP         faceplayerslow
  53. ai AICOOTCROUCHDN     ACOOTCROUCHDN   COOTSTOP         faceplayerslow
  54.  
  55.  
  56. // States (subroutines) ******************************
  57. state coot_jibs
  58.   guts JIBS2 1
  59.   guts JIBS3 2
  60.   guts JIBS4 3
  61.   guts COOTJIBA 1
  62.   guts COOTJIBB 1
  63.   guts COOTJIBC 2
  64.   ifrnd 6
  65.   {
  66.     guts JIBS1 1
  67.     spawn BLOODPOOL
  68.   }         // spine
  69.   state jib_sounds
  70. ends
  71.  
  72. state cootseekstate
  73.   // This coot type is usually put behind counters
  74.   // He duckwalks around and then pops up, if he
  75.   // can see you he'll shoot, then he ducks back
  76.   // down and duckwalks around
  77.   ifspritepal 31
  78.   {
  79.     ifp palive
  80.      ifcansee
  81.        ifcanshoottarget
  82.        {
  83.           ai AICOOTRAISEGUN
  84.           break
  85.        }
  86.   }
  87.   else
  88.   {
  89.     // If COOT is allowed to leave his home sector
  90. //    ifactornotstayput
  91. //    {
  92.       // if current COOT ai is charging enemy
  93.       ifai AICOOTCHARGEENEMY
  94.       {
  95.         // NN out of 256 times, if player distance > 3072
  96.         // and player is alive and COOT can
  97.         // see player, switch ai to shoot
  98.  
  99.          ifrnd 32
  100.            ifp palive
  101.              ifcansee
  102.                ifcanshoottarget
  103.              {
  104.                 ai AICOOTRAISEGUN
  105.                 break
  106.              }
  107.  
  108.          ifactioncount 3
  109.          {
  110.             ifrnd 8
  111.             {
  112.                ai AICOOTFLEENEMY
  113.                break
  114.             }
  115.  
  116.             ifrnd 8
  117.             {
  118.                ai AICOOTCROUCHDN
  119.                break
  120.             }
  121.          }
  122.       }
  123.       // if ai NOT charge, and distance > 1596
  124.       // switch ai so IS charge
  125.       else ifpdistg 1596
  126.       {
  127.          ai AICOOTCHARGEENEMY
  128.          break
  129.       }
  130.       else ifpdistl 1597
  131.       {
  132.         ifrnd 16
  133.         {
  134.           ai AICOOTSHOOT
  135.           break;
  136.         }
  137.       }
  138.  
  139.  
  140.       // NN out of 256 times, if we get down here in
  141.       // the code and we're not moving
  142.       // try opening a door to find player
  143.       ifrnd 4
  144.         ifnotmoving
  145.           operate
  146.       // else NN out of 256 times, if projectile near
  147.       else ifrnd 16
  148.         ifbulletnear
  149.         {
  150.           ai AICOOTDODGE
  151.         }
  152. //    }
  153.     // Else COOT confined to home sector
  154. //    else
  155. //    {
  156.       // if count > 16, 32 out of 256 times, move COOT at a
  157.       // random angle with current horizontal movement
  158. //      ifcount 16
  159. //        ifrnd 32
  160. //          move COOTWALKVEL randomangle geth
  161. //    }
  162.  
  163.   }  // end else not spritepal 31
  164.  
  165. // end COOTseekstate
  166. ends
  167.  
  168.  
  169. state cootfleestate
  170.  
  171.   // if count > NN
  172.   ifcount 10
  173.   {
  174.     // NN out of 256 times, if dist > NN, and player alive,
  175.     // and can see, switch ai to shoot
  176.     ifrnd 32
  177.     {
  178.       ifpdistg 2048
  179.         ifp palive
  180.           ifcansee
  181.             ifcanshoottarget
  182.               ai AICOOTRAISEGUN
  183.     }
  184.   }
  185.   // else count <= NN
  186.   else
  187.   {
  188.     iffloordistl 16
  189.     {
  190.       ifnotmoving
  191.         ai AICOOTGETENEMY
  192.     }
  193.     else
  194.       ai AICOOTGETENEMY
  195.     break
  196.   }
  197. // end COOTfleestate
  198. ends
  199.  
  200.  
  201. state checkcoothit
  202.   ifspritepal 8
  203.   {
  204.   
  205.   }
  206.   else
  207.   {
  208.     spawn BLOOD
  209.   }
  210.   
  211.   ifdead
  212.   {
  213.     ifspritepal 8
  214.     {
  215.       addkills 1
  216.       killit
  217.     }
  218.  
  219.     state random_wall_jibs
  220.     // state drop_ammo
  221.     addkills 1
  222.     cstat 0 
  223.     ifwasweapon CROWBAR
  224.     {
  225.       state drop_pistol
  226.       spawn AMMO
  227.     }
  228.     ifwasweapon RIFLE
  229.     {
  230.       state drop_pistol
  231.     }
  232.     ifwasweapon SHOTGUN
  233.     {
  234.      state drop_pistol
  235.     }
  236.     ifwasweapon SHOTSPARK1
  237.     {
  238.      state drop_pistol
  239.     }
  240.     ifwasweapon SLINGBLADE
  241.     {
  242.       state drop_ammo
  243.       sound SQUISHED
  244.       // state standard_jibs
  245.       state coot_jibs
  246.       killit
  247.     }
  248.     else ifwasweapon CROSSBOW
  249.     {
  250.       state drop_ammo
  251.       sound SQUISHED
  252.       // state standard_jibs
  253.       state coot_jibs
  254.       killit
  255.     }
  256.     else
  257.     ifwasweapon RADIUSEXPLOSION
  258.     {
  259.       state drop_pistol
  260.       sound SQUISHED
  261.       spawn BLOODPOOL
  262.       // state standard_jibs
  263.       state coot_jibs
  264.       killit
  265.     }
  266.     else
  267.     ifwasweapon MOTOHIT
  268.     {
  269.       ifmotofast
  270.       {
  271.         state drop_pistol
  272.         sound SQUISHED
  273.         spawn BLOODPOOL
  274.         // state standard_jibs
  275.         state coot_jibs
  276.         killit
  277.       }
  278.       else
  279.       {
  280.         state drop_pistol 
  281.         ai AICOOTDYING       
  282.       }
  283.     }
  284.     else
  285.     {
  286.       // if wasn't blown up, leave body as
  287.       // solid so can be blown up
  288.       ai AICOOTDYING
  289.     }
  290.     sound CT_DIE
  291.   }
  292.   else
  293.   {
  294.     sound CT_PAIN
  295.     state random_wall_jibs
  296.  
  297.     // If this is other type of Coot,
  298.     //  Have him duck back down behind the counter
  299.     //  if he's been shot
  300.     ifspritepal 31
  301.     {
  302.       ai AICOOTCROUCHDN
  303.     }
  304.     else
  305.     {
  306.       ifrnd 64
  307.       {
  308.         ai AICOOTPAIN
  309.       }
  310.       else ifrnd 64
  311.         ai AICOOTSHOOT
  312.       else ifrnd 64
  313.         ai AICOOTFALLDOWN
  314.       else
  315.         ai AICOOTDODGE
  316.     }
  317.   }
  318. ends
  319.  
  320.  
  321. state cootdyingstate
  322.   ifaction ACOOTLYINGDEAD
  323.   {
  324.     strength 0
  325.     ifhitweapon
  326.       ifwasweapon RADIUSEXPLOSION
  327.       {
  328.         sound SQUISHED
  329.         // state standard_jibs
  330.         state coot_jibs
  331.         killit
  332.         break
  333.       }
  334.   }
  335.   else ifai AICOOTDYING
  336.   {
  337.     ifactioncount 6
  338.     {
  339.       ifrnd 64
  340.         spawn BLOODPOOL
  341.       state bf
  342.       iffloordistl 8
  343.         sound THUD
  344.       move COOTSTOP
  345.       action ACOOTLYINGDEAD
  346.       break
  347.     }
  348.   }
  349. ends
  350.  
  351.  
  352. state cootdodgestate
  353.   ifactioncount 33
  354.     ai AICOOTGETENEMY
  355. ends
  356.  
  357. state cootduckwalkstate
  358.   // Coots with special tags duckwalk more
  359.   // then Coots which wander around
  360.   ifspritepal 31
  361.   {
  362.     ifactioncount 23
  363.       ai AICOOTCROUCHUP
  364.   }
  365.   else
  366.   {
  367.     ifactioncount 13
  368.       ai AICOOTCROUCHUP
  369.   }
  370. ends
  371.  
  372. state cootshootstate
  373.     ifactioncount 5
  374.     {
  375.       ai AICOOTLOWERGUN
  376.       break
  377.     }
  378.     ifcount 11
  379.       nullop
  380.     else ifcount 10
  381.     {
  382.         sound CASUL_FIRE
  383.         shoot RIFLE
  384.  
  385.         resetcount
  386.     }
  387.  
  388. ends
  389.  
  390. // Actors ********************************************
  391. actor COOTSTAYPUT COOTSTRENGTH ACOOTDEFAULT
  392.         ai AICOOTGETENEMY
  393.         cactor COOT
  394. enda
  395.  
  396.  
  397. actor COOT COOTSTRENGTH ACOOTDEFAULT
  398.   fall
  399.   state checksquished
  400.  
  401.   ifai 0
  402.   {
  403.     cstator 257
  404.     ai AICOOTGETENEMY
  405.   }
  406.  
  407.   ifaction ACOOTLYINGDEAD
  408.   {
  409.     state cootdyingstate
  410.     break
  411.   }
  412.   else
  413.   {
  414.     ifai AICOOTGETENEMY
  415.     {
  416.       state cootseekstate
  417.     }
  418.     else ifai AICOOTCHARGEENEMY
  419.     {
  420.       state cootseekstate
  421.     }
  422.     else ifai AICOOTPAIN
  423.     {
  424.       ifcount 18
  425.         ai AICOOTGETENEMY
  426.     }
  427.     else ifai AICOOTDODGE
  428.     {
  429.         state cootdodgestate
  430.     }
  431.     else ifai AICOOTGETUP
  432.     {
  433.         ifactioncount 2
  434.            ai AICOOTGETENEMY
  435.     }
  436.     else ifai AICOOTFALLDOWN
  437.     {
  438.         ifactioncount 2
  439.            ai AICOOTGETUP
  440.     }
  441.     else ifai AICOOTCROUCHUP
  442.     {
  443.         ifactioncount 2
  444.            ai AICOOTGETENEMY
  445.     }
  446.     else ifai AICOOTCROUCHDN
  447.     {
  448.         ifactioncount 2
  449.            ai AICOOTDUCKWALK
  450.     }
  451.     else ifai AICOOTDUCKWALK
  452.     {
  453.         state cootduckwalkstate
  454.     }
  455.     else ifai AICOOTRAISEGUN
  456.     {
  457.       ifactioncount 2
  458.         ai AICOOTSHOOT
  459.     }
  460.     else ifai AICOOTLOWERGUN
  461.     {
  462.       ifactioncount 2
  463.       {
  464.         // If tagged Coot, duck back down behind
  465.         // counter when done shooting
  466.         ifspritepal 31
  467.         {
  468.            ai AICOOTCROUCHDN
  469.         }
  470.         // else get enemy
  471.         else
  472.           ai AICOOTGETENEMY
  473.       }
  474.     }
  475.     else ifai AICOOTFLEENEMY
  476.     {
  477.         state cootfleestate
  478.     }
  479.     else ifai AICOOTDYING
  480.     {
  481.         state cootdyingstate
  482.     }
  483.     else ifai AICOOTSHOOT
  484.     {
  485.         state cootshootstate
  486.     }
  487.   }
  488.  
  489.   ifhittruck
  490.   {
  491.       ai AICOOTDYING
  492.   }
  493.   else ifhitweapon
  494.       state checkcoothit
  495.  
  496.   ifrnd 3
  497.   {
  498.       ifrnd 16
  499.         soundonce CT_LAF2
  500.       else ifrnd 16
  501.         soundonce CT_LAND
  502.   }
  503. enda
  504.  
  505. // End of Use COOT
  506.  
  507.